<template>
  <div>
    <leftmenu></leftmenu>
    <div id="content">
      <face></face>

      <div class="container">
        <h3 class=" text-size-md">复习的规则:</h3>
        <p class="title">单词记忆是有一定的遗忘曲线,通过复习
          征服自己的遗忘曲线。</p>
        <ul>
          <li>1、如果正确,将获得1点经验;</li>
          <li>2、如果错误,将被扣除2点经验;</li>
          <li>3、如果一个单词3次以上连续错误,该单词 将移到任务区,进行重新考核。</li>
        </ul>
        <h4>你需要足够的经验才能启动计划</h4>
        <p class="checkbox"><label for="prompt"><input type="checkbox" id="prompt" v-model="NoReadReviseRule">以后不再提示</label></p>
      </div>
    </div>


    <nav-btn @click.native="go([$router,'/revise'])" text="开始吧" backgroundName="orange" position="fixed"></nav-btn>

  </div>

</template>

<script>
  import {mapMutations } from 'vuex'
  import navBtn from '../components/nav-btn.vue'
  import leftmenu from '../components/leftmenu.vue'
  import face from '../components/face.vue'
  export default{
    data(){
      return{"NoReadReviseRule":this.$store.state.NoReadReviseRule}
    },
    components:{navBtn,leftmenu,face},
    methods:{
      ...mapMutations([
        'go'
      ])
    },
    watch:{
      NoReadReviseRule:function(newval){
        this.$store.state.NoReadReviseRule = newval
        console.log(this.$store.state.NoReadReviseRule)
//        var formData = new formData()
//        formData.append("NoReadReviseRule",newval);
//        this.$http.post('...',formData).then(function(){
//          console.log('成功');
//        },function(error){
//          console.log('失败');
//        })
     }
    }
  }
</script>

<style lang="less" scoped>
  #content{
    padding:20px;
  }
  div.container{
    line-height:1.8em;
    margin:40px 0 20px 0;
  }
  p.title{
    margin:20px 0;
    text-indent: 2em;

  }
  div.container h4{
    text-align:center;
    font-size:120%;
    margin:40px 0;
  }
  p.checkbox{text-align: right;}
</style>
